<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page import="java.util.*"%>
<%@ page import="com.mcms.web.vo.PageAction"%>
<%@ page import="com.mcms.web.vo.DictCache"%>
<%@ page import="com.mcms.util.MapUtil"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
	Map resultMap = (Map)request.getAttribute("resultMap");
	List list = (List)resultMap.get("resultList");
	//String num = request.getAttribute("resultListNum").toString();
	
	//String num = "37";
	//PageAction pageAction = (PageAction)request.getAttribute("pageAction");
	PageAction pageAction = (PageAction)resultMap.get("pageAction");
	if(pageAction == null){
		pageAction = new PageAction();
		request.setAttribute("pageAction",pageAction);
	}
	int totalNum = pageAction.getPagePara().getTotal();
	int pageNum = pageAction.getPageNum();
	int pageSize = pageAction.getPagePara().getPageSize();
	int pageTotal = pageAction.getPagePara().getTotal();
	
%>	
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<link href="<%=basePath %>themes/css/login.css" rel="stylesheet" type="text/css" />
<title>客户信息管理系统</title>


</head>
<body>
<form id="pagerForm" method="post" action="#rel#">
	<input type="hidden" name="pageNum" value="1" />
	<input type="hidden" name="numPerPage" value="${model.numPerPage}" />
	<input type="hidden" name="orderField" value="${param.orderField}" />
	<input type="hidden" name="orderDirection" value="${param.orderDirection}" />
</form>

<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="<%=basePath %>customList.html?userName=aaa&deptCode=kf&actionType=listCustom&flag=2" method="post">
	<div class="searchBar">
		<ul class="searchContent">
			<li>
				<label>客户信息：</label>
				<input type="text" name="customInfo" alt="预约就诊号/身份证号" value=""/>
			</li>
			<li>
				<label>联系方式：</label>
				<input type="text" name="connect" alt="电话号码/qq/email" value=""/>
			</li>
			<!-- 
			<li>
			<select class="combox" name="province">
				<option value="">所有省市</option>
				<option value="北京">北京</option>
				<option value="上海">上海</option>
				<option value="天津">天津</option>
				<option value="重庆">重庆</option>
				<option value="广东">广东</option>
			</select>
			</li> -->
		</ul>
		<!--
		<table class="searchContent">
			<tr>
				<td>
					我的客户：<input type="text"/>
				</td>
				<td>
					<select class="combox" name="province">
						<option value="">所有省市</option>
						<option value="北京">北京</option>
						<option value="上海">上海</option>
						<option value="天津">天津</option>
						<option value="重庆">重庆</option>
						<option value="广东">广东</option>
					</select>
				</td>
			</tr>
		</table>
		-->
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
				<li><a class="button" href="<%=basePath %>advancedQuery.html?userName=aaa&deptCode=kf&actionType=showContent" target="dialog" mask="true" title="查询框"><span>高级检索</span></a></li>  
				
			</ul>
		</div>
	</div>
	</form>
</div>
<div class="pageContent">
	
	<table class="table" width="100%" layoutH="138">
		<thead>
			<tr>
				
				<th width="20%" class="">客户号</th> 
				<th width="15%">客户姓名</th>
				<th width="15%" orderField="accountType">电话号码</th>
				<th width="15%" orderField="accountCert">预约号</th>
				<th width="5%" align="center" orderField="accountLevel">性别</th>
				<th width="10%">联系QQ</th>
				<th width="10%">状态</th>
				<th width="10%">操作</th>
			</tr>
		</thead>
		<tbody>
			<%
			for(int i=0;i<list.size();i++){
				Map map = (Map)list.get(i);
		%>
				
				<tr target="sid_user" rel="<%=i%>">
				
				<td width="20%"><%=MapUtil.getString(map,"CUSTOM_ID")%></td>
				<td width="15%"><%=MapUtil.getString(map,"CUSTOM_NAME")%></td>
				<td width="15%"><%=MapUtil.getString(map,"TELEPHONE_NO")%></td>
				<td width="15%"><%=MapUtil.getString(map,"subscribe_doctor_id")%></td>
				<td width="5%" align="center" orderField="accountLevel"><%=(map.get("GENDER")==null||MapUtil.getString(map,"GENDER").trim().length()==0)?"":((Map)DictCache.getInstance().getDictMapByType("SEX")).get(MapUtil.getString(map,"GENDER"))%></td>
				<td width="10%"><%=MapUtil.getString(map,"QQ")%></td>
				<td width="10%"><%=MapUtil.getString(map,"status")%></td>
				<td width="10%">
					<!--
					<a title="删除" target="ajaxTodo" href="demo/common/ajaxDone.html?id=xxx" class="btnDel">删除</a>
					-->
					<a title="查看" target="navTab" href="<%=basePath %>updateCustom.html?userName=aaa&deptCode=fz&actionType=detailCustomPage&customid=<%=MapUtil.getString(map,"CUSTOM_ID")%>" class="btnView">查看</a>
					
				</td>
			</tr>
			<% } %>
		</tbody>
	</table>
	<div class="panelBar">
		<div class="pages">
			<span>显示</span>
			<select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
				<option value="10"
				  <%if(pageSize == 10)  {%>selected<%} %>>10</option>
				<option value="20"
				  <%if(pageSize == 20)  {%>selected<%} %>>20</option>
				<option value="50"
				  <%if(pageSize == 50)  {%>selected<%} %>>50</option>
				<option value="100"
				  <%if(pageSize == 100)  {%>selected<%} %>>100</option>
				<option value="200"
				  <%if(pageSize == 200)  {%>selected<%} %>>200</option>
			</select>
			<span>条，共<%=totalNum %>条</span>
		</div>
		
		<div class="pagination" targetType="navTab" totalCount="<%=totalNum %>" numPerPage="<%=pageSize %>" pageNumShown="10" currentPage="<%=pageNum %>"></div>

	</div>
</div>

</body>
</html>